﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EffectController : MonoBehaviour
{
    public void Init(Vector3 startPoint, Vector3 endPoint)
    {
        if (GetComponent<LineController>() != null)
        {
            transform.GetChild(0).transform.position = startPoint;
            transform.GetChild(1).transform.position = endPoint;
        }
        else
        {
            transform.position = startPoint;
        }
    }

    public void Finish()
    {
        if (GetComponent<EventController>() != null)
        {
            GetComponent<EventController>().Finish();
        }
    }
}